
<?php
include("db/connect.php");
?>

<script language="javascript">
function submitMat(){

	$.ajax({
			type:"POST",
			url:"insert_material2.php",
			data:$("#fromInsert_Mat").serialize(),
			success: function(msg){
				
				$("#listspan").load("list_stock1.php");
				}
			});//ajax
	}
	
	function choosemat(){
		$.ajax({
			url:$("#statusmat").val(),
			success: function(msg){
				$("#listspan").html(msg);
				}
			});
		}
</script>
<style type="text/css">
#fromInsert_Mat p {
	text-align: center;
	font-size: 36px;
}
</style>

<form id="fromInsert_Mat" name="fromInsert_Mat" method="post" action="Javascript:submitMat();">
  <p>รายการเพิ่มข้อมูลวัตถุดิบ</p>
  <table width="528" border="0">
    <tr>
      <td width="178">ชื่อสินค้า</td>
      <td width="340">
      <input name="mat_name" type="text" required="required" id="mat_name" /></td>
    </tr>
    <tr>
      <td>ราคา</td>
      <td>
      <input name="mat_price" type="text" required="required" id="mat_price" /></td>
    </tr>
    <tr>
      <td>หน่วย</td>
      <td>
      <input type="text" name="mat_unit" id="mat_unit" required="required"/></td>
    </tr>
  </table>
  <p>
    <input type="submit" name="Submit" id="button" value="เพิ่ม" />
    <input type="reset" name="button2" id="button2" value="ยกเลิก" />
  </p>
  <p>&nbsp;</p>
</form>
<div id="spantest"></div>
<script>
$(function(){
$("#frmsearch").remove();
});

</script>

